Skip to content

chore(harden): commit /harden command + harden sandbox-mask git hygiene - #21

Merged
robercano-ghbot merged 1 commit into
mainfrom
chore/harden-hygiene
Jul 1, 2026
Merged

chore(harden): commit /harden command + harden sandbox-mask git hygiene#21
robercano-ghbot merged 1 commit into
mainfrom
chore/harden-hygiene

Conversation

@robercano-ghbot

Copy link
Copy Markdown
Collaborator

What

Commits the /harden command and makes the template resilient to the sandbox's /dev/null config masks.

  • .claude/commands/harden.md — the /harden command existed locally but was never committed; now it is.
  • docs/HARDENING.md — new Caveat: a sandboxed session bind-mounts /dev/null over sensitive paths (shell rc, .gitconfig, editor dirs, .mcp.json, Claude's .claude/{hooks,skills,routines,launch.json}). They appear as character-device files (crw-rw-rw- … 1,3) that git status reports as untracked/modified though they aren't real files. Explains the two consequences (no blanket git add; which paths are gitignored vs not).
  • .gitignore — ignore .claude/settings.local.json + the unambiguous personal dotfiles the sandbox masks. Deliberately not .mcp.json/.gitmodules/.claude/* (can be legit tracked files).
  • implementer.md / orchestrator.md — hard rule: stage explicit paths, never git add -A / git commit -a, so a masked device node can't abort a worker's commit.

Why

Every project generated from this template runs under the sandbox (settings.json has sandbox.enabled: true, and /harden tightens it), so every downstream repo sees these phantom entries. Without this, a worker doing git add -A can fail to commit, and agents/humans waste cycles on non-existent "untracked" files. The explicit-staging rule is the robust fix; the gitignore + doc reduce the noise.

Notes

  • Commits unsigned (sandbox can't reach the SSH signing key), matching the reDeploy loop.
  • No behavior change beyond the staging rule + ignore list; generic agents/scripts untouched otherwise.

🤖 Generated with Claude Code

https://claude.ai/code/session_011HosUeuSvhetARboEfDW6K

…for sandbox masks

- Add .claude/commands/harden.md (was present locally but never committed).
- docs/HARDENING.md: document that a sandboxed session masks sensitive config
  paths as /dev/null device nodes (phantom git-status noise), and how to cope.
- .gitignore: ignore machine-local settings.local.json + the unambiguous personal
  dotfiles the sandbox masks (NOT .mcp.json/.gitmodules/.claude/* — those can be real).
- implementer.md / orchestrator.md: hard rule to stage explicit paths, never
  `git add -A`/`git commit -a`, so a masked device node can't abort a worker's commit.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011HosUeuSvhetARboEfDW6K
@robercano-ghbot
robercano-ghbot merged commit e23edc6 into main Jul 1, 2026
6 checks passed
@robercano-ghbot
robercano-ghbot deleted the chore/harden-hygiene branch July 1, 2026 19:08
robercano-ghbot pushed a commit that referenced this pull request Jul 1, 2026
Adds a "Concurrent config-write safety" subsection to ARCHITECTURE.md → Limits:
links anthropics/claude-code#29217, the probe finding (didn't repro on v2.1.153),
mitigations (max_parallel_workers 2-3, no concurrent sessions, keep updated), and
the residual settings.json-staging risk mitigated by the explicit-staging rule.

Docs-module slice of #5; the implementer staging rule already landed in #21.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011HosUeuSvhetARboEfDW6K
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants